home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac SampleCode New for 1.6 / RollerCoasterSampleMac / Interfaces / QD3DSupport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-18  |  2.9 KB  |  111 lines  |  [TEXT/dosa]

  1. /*
  2.     File:        QD3DSupport.h
  3.     
  4.     Contains:    Interface file for QD3DSupport.c
  5.     
  6.     Written by:    Scott Kuechle, based on original Gerbils code by Brian Greenstone
  7.  
  8.     Copyright:    © 1998 by Apple Computer, Inc. All rights reserved
  9.     
  10.     Change History (most recent first)
  11.     
  12.         <1>        9/1/98        srk        first file
  13.  
  14.  
  15. */
  16.  
  17. #pragma once
  18.  
  19. /************************************************************
  20. *                                                           *
  21. *    INCLUDE FILES                                          *
  22. *                                                           *
  23. *************************************************************/
  24.  
  25. #if defined(_MSC_VER)
  26. #include "WinPrefix.h"
  27. #else
  28. #include <ConditionalMacros.h>
  29. #endif
  30.  
  31. #if TARGET_OS_WIN32
  32.     #include <QTML.h>
  33.     #define    STRICT
  34.     #include <windows.h>
  35. #endif
  36.  
  37.  
  38. #include "Document.h"
  39. #include "Track.h"
  40. #include "TextureMap.h"
  41. #include "Utils.h"
  42.  
  43. #include <MacTypes.h>
  44.  
  45.  
  46. /* for QuickDraw 3D */
  47. #include "QD3D.h"
  48. #include "QD3DMath.h"
  49. #include "QD3DDrawContext.h"
  50. #include "QD3DGroup.h"
  51. #include "QD3DCamera.h"
  52. #include "QD3DGeometry.h"
  53. #include "QD3DErrors.h"
  54. #include "QD3DRenderer.h"
  55. #include "QD3DLight.h"
  56. #include "QD3DSet.h"
  57. #include "QD3DTransform.h"
  58. #include "QD3DAcceleration.h"
  59.  
  60. #include "Movies.h"
  61.  
  62. /************************************************************
  63. *                                                           *
  64. *    CONSTANTS                                              *
  65. *                                                           *
  66. *************************************************************/
  67.  
  68. #define        kTrackSubDivFactor        1.0F
  69.  
  70. #define     kSkipValue                 1.0F    /* 22 */
  71. #define     kTextureRezID            129    /* rivets style */
  72.  
  73. #define        GROUND_SIZE            60
  74. #define        GROUND_TILESIZE        10
  75. #define        GROUND_WIDTHX        ((GROUND_SIZE*2)/GROUND_TILESIZE)        /* (in tiles) - for gouraud */
  76. #define        GROUND_WIDTHZ        ((GROUND_SIZE*2)/GROUND_TILESIZE)
  77. #define        GROUND_X            (-GROUND_SIZE)
  78. #define        GROUND_Z            (-GROUND_SIZE)
  79.  
  80. #define    RECT_WIDTH(r)    (r.right-r.left)
  81.  
  82. #define    RECT_HEIGHT(r)    (r.bottom-r.top)
  83.  
  84. #define    kGrndTextureResID            300
  85. #define    kNumGrndTextureVertices        4
  86.  
  87. #define    kGroundTextureFileName    "GroundTexture.pct"
  88.  
  89. #define    kTrackTextureFileName    "MetalTrack.pct"
  90.  
  91. /************************************************************
  92. *                                                           *
  93. *    FUNCTION PROTOTYPES                                    *
  94. *                                                           *
  95. *************************************************************/
  96.  
  97. TQ3Status QD3DSupport_DocDraw3DData( DocumentPtr theDocument);
  98. void QD3DSupport_DisposeDoc3DData( DocumentPtr theDocument);
  99. #if TARGET_OS_MAC
  100.     void QD3DSupport_InitDoc3DData( WindowPtr     window,
  101.                                     DocumentPtr theDocument );
  102. #else if TARGET_OS_WIN32
  103.     void QD3DSupport_InitDoc3DData( HWND         window,
  104.                                     DocumentPtr theDocument );
  105. #endif
  106. TQ3Point3D AdjustCamera(
  107.     TQ3ViewObject        theView,
  108.     TQ3GroupObject        mainGroup,
  109.     short                winWidth,
  110.     short                winHeight) ;
  111.